Published: Nov 4, 20232 min read

Make you music follow you with ESPresense Room Presence Detection

Written by: Fixt

You can use the Spotify and YT Music Blueprints without ESPresense

Prerequisites

Espresense Tutorial
Spotify Tutorial
Youtube Music Tutorial

ESPresense: Tolerance Update

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Create input_select

Open your Home Assistant instance and show your helper entities.

config/configuration.yaml

input_select:
  fixt_ble_dropdown:
    name: Fixt BLE Dropdown
    options:
      - Away
      - Bedroom
      - Living Room
      - Kitchen
      - Entrance
      - Restroom
    initial: Away

Music Blueprints

Room Music Follow - Spotify

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Room Music Follow - YT Music

  • Added media selector to select playlist or album to play
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Automation Example

config/configuration.yaml

description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - input_select.fixt_ble_dropdown
condition:
  - condition: state
    entity_id: input_boolean.bedroom_sleep
    state: "off"
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Living Room
        sequence:
          - service: script.room_music_follow_living_room
            data: {}
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Bedroom
        sequence:
          - service: script.room_music_follow_bedroom
            data: {}
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Entrance
        sequence:
          - service: script.room_music_follow_entrance
            data: {}
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Kitchen
        sequence:
          - service: script.room_music_follow_kitchen
            data: {}
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Restroom
        sequence:
          - service: script.room_music_follow_restroom
            data: {}
      - conditions:
          - condition: state
            entity_id: input_select.fixt_ble_dropdown
            state: Away
        sequence:
          - service: media_player.media_stop
            data: {}
            target:
              # Change to your Spotify or Youtube Music Player
              entity_id: media_player.ytube_music_player              
alias: Music Follow

I would love to hear your comments, or suggestions on this post.


Avatar of Fixt

Fixt is a Software Engineer passionate about making the world a better place through technology and automation.